
    <core:SET width='200'>

<script language="Javascript">

// Gets a element by its Id. Used for shorter coding.
function GetE( elementId )
{
	return document.getElementById( elementId )  ;
}

function ShowE( element, isVisible )
{
	if ( typeof( element ) == 'string' )
		element = GetE( element ) ;
	element.style.display = isVisible ? '' : 'none' ;
}

function SetAttribute( element, attName, attValue )
{
	if ( attValue == null || attValue.length == 0 )
		element.removeAttribute( attName, 0 ) ;			// 0 : Case Insensitive
	else
		element.setAttribute( attName, attValue, 0 ) ;	// 0 : Case Insensitive
}

function GetAttribute( element, attName, valueIfNull )
{
	var oAtt = element.attributes[attName] ;

	if ( oAtt == null || !oAtt.specified )
		return valueIfNull ? valueIfNull : '' ;

	var oValue = element.getAttribute( attName, 2 ) ;

	return ( oValue == null ? valueIfNull : oValue ) ;
}


      function AddImage() {

        var width = screen.width*0.7;
		var height = screen.height*0.7;

		var iLeft = (screen.width  - width) / 2 ;
        var iTop  = (screen.height - height) / 2 ;

        var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
		sOptions += ",width=" + width  ;
		sOptions += ",height=" + height ;
		sOptions += ",left=" + iLeft ;
		sOptions += ",top=" + iTop ;

		var path = '/{$#app_name}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php';
   		window.open(path, "FCKBrowseWindow", sOptions ) ;
      }

      function SetUrl( fileUrl ) {
          	document.forms[0].photo_url.value=fileUrl;
          	var picture = GetE('img_picture_url');
          	if (picture) SetAttribute( picture, 'src', fileUrl );
            var size_element =  GetE('size');
          	if (size_element) size_element.style.visibility = 'hidden';
      }

</script>

    <tr align="left">
    	<td colspan="2" class="whiteheader_center">
    		<core:optional for="firstname">
    		Subscriber User:
            </core:optional>
            <core:default for="number_subscriptions">
            User:
            </core:default>

    		<core:optional for="firstname">  {$firstname}, </core:optional>
    		<core:optional for="lastname"> {$lastname} </core:optional>
            <core:default for="firstname">  (None) </core:default>

            <core:optional for="number_subscriptions">
            	: <html:link url="/subscriptions" param="user_id">View subscriptions ({$number_subscriptions})</html:link>
            </core:optional>
            <core:optional for="number_payments">
            	: <html:link url="/user_payments" param="user_id">View payments  ({$number_payments})</html:link>
            </core:optional>

    	</td>
     </tr>

    <core:default for="supress_errors">
    <ERRORSUMMARY id='Summary' runat="server">
        <tr valign="top">
          <td width="{width}">Errors: &nbsp;</td>
          <td class="left">
          	<FONT COLOR="RED">
          		<list:ITEM> {$ErrorMessage} &nbsp; </list:ITEM>
          	</FONT>
          </td>
        </tr>
     </ERRORSUMMARY>
     </core:default>

     <tr>
     	<td class="subheader" colspan="2"> Personal information
     	</td>
     </tr>

	<input name="user_id" type="hidden" id="user_id" runat="server">
	<input name="page" type="hidden" id="page" runat="server">

    <tr>
    <td colspan="2" valign="top">
     	<table align="left" cellspacing="0" cellpadding="0" border="0" width="100%">
     		<tr>
     			<td width="100%">
     				<table cellspacing="1" cellpadding="2" border="0" align="left" width="100%">
                        <tr valign="top">
      						<td class="form_label" width="{$width}">
      							<label for="firstname" runat="server">First name</label>
      						</td>
      						<td class="form_field">
      							<input name="firstname" type="text" id="firstname" size="64" runat="server">
      						</td>
    					</tr>
    					<tr valign="top">
      						<td class="form_label" width="{$width}"><label for="lastname" runat="server">Last name</label></td>
      						<td class="form_field"><input name="lastname" type="text" id="lastname" size="64" runat="server"></td>
    					</tr>
    					<tr valign="top">
      						<td class="form_label" width="{$width}"><label for="email" runat="server">Email</label></td>
      						<td class="form_field"><input name="email" type="text" id="email" size="64" runat="server"></td>
    					</tr>
    					<tr valign="top">
      						<td class="form_label" width="{$width}"><label for="age" runat="server">Age</label></td>
      						<td class="form_field"><input name="age" type="text" id="age" size="8" runat="server"></td>
    					</tr>
     				</table>
     			</td>
     		</tr>
		</table>
	</td>
	</tr>

    <core:default for="#photo_no">
    <tr valign="top">
    	<td class="form_label" width="{$width}">
    		<label for="photo_url" runat="server">User photo:</label>
    	</td>
      	<td class="form_field">
           		<core:optional for="photo_url">
           			<a id="a_picture_url" name="a_picture_url" href="{$photo_url}">
             			<img id="img_picture_url" name="img_picture_url" src="{$photo_url}" border="0"/>
           			</a> <br>
           			<div id="size" name="size">
           			  Size: {$photo_width}*{$photo_height} <br>
           			</div>
                </core:optional>

                <core:default for="photo_url">
                   <img id="img_picture_url" name="img_picture_url" src="/{$#app_name}/images/1x1.gif" border="0"/>
           		   <br>
                </core:default>

                <core:default for="#photo_no">
                	<input name="photo_url" type="text" id="photo_url" runat="server" size="64">
                	<BUTTON name="add_image" style="width:150;" class="form_button" onclick="AddImage();">Add/Change image</BUTTON>
     			</core:default>

     			<input name="photo_id" type="hidden" id="photo_id" runat="server">


      	</td>
    </tr>
    </core:default>





                <!--<core:optional for="photo_show">
                <td>

                	Photo:
                	<a href="{$image_path}">
                		<img width="200" height="150" src="{$image_path_thumb}"/>
                	</a>
     			</td>
     			</core:optional>-->






    <tr>
     	<td class="subheader" colspan="2"> Address and Contact information
     	</td>
    </tr>

    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="address1" runat="server">Address 1</label></td>
      <td class="form_field"><input name="address1" type="text" id="address1" size="64" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="address2" runat="server">Address 2</label></td>
      <td class="form_field"><input name="address2" type="text" id="address2" size="64" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="city" runat="server">City</label></td>
      <td class="form_field"><input name="city" type="text" id="city" size="32" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="state" runat="server">State</label></td>
      <td class="form_field">
      	<select name='state' id='state' default_value='AL' runat="server">
	 	</select>
      </td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="zip" runat="server">Zip</label></td>
      <td class="form_field"><input name="zip" type="text" id="zip" size="7" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="country" runat="server">Country</label></td>
      <td class="form_field"><input name="country" type="text" id="country" size="16" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="home_phone" runat="server">Home Phone</label></td>
      <td class="form_field"><input name="home_phone" type="text" id="home_phone" size="16" runat="server"></td>
    </tr>
    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="work_phone" runat="server">Work Phone</label></td>
      <td class="form_field"><input name="work_phone" type="text" id="work_phone" size="16" runat="server"></td>
    </tr>

    <tr>
     	<td class="subheader" colspan="7"> Login information
     	</td>
    </tr>



    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="login" runat="server">Username</label></td>
      <td class="form_field"><input name="login" type="text" id="login" size="32" runat="server"></td>
    </tr>

    <tr valign="top">
      <td class="form_label" width="{$width}"><label for="password" runat="server">Password</label></td>
      <td class="form_field"><input name="password" type="text" id="password" size="32" runat="server"></td>
    </tr>
    <!--
    <tr valign="top">
      <td class="form_label" width="20%"><label for="password2" runat="server">Password</label></td>
      <td class="form_field" width="80%"><input name="password2" type="password" id="password2" size="32" runat="server"></td>
    </tr>  -->
    <!--
    <tr align="left">
    	<td colspan="2" class="whiteheader_center"> &nbsp;
    	</td>
     </tr>
     -->